import { axGet, axPostJson } from '../../lib/request';
import urls from './user.url';

const userService = {
  login(data) {
    /**
     *  登录
     *  */
    return axPostJson(urls.login, data, null, {
      noToast: true,
    });
  },
  logout(data) {
    /**
     *  登出
     *  */
    return axGet(urls.logout, data);
  },
  getUserInfo() {
    /**
     *  用户信息
     *  */
    return axGet(urls.userInfo, null, { noToast: true, noLoading: true });
  },
};

export default userService;
